// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

using System;
using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;
using System.Threading;

namespace SnapObjects.Data
{
    public interface IAdoDbDataVisitor : IDisposable
    {
        int FieldCount { get; }

        bool HasRows { get; }

        bool IsClosed { get; }

        IList<DbColumnInfo> GetColumnSchema();

        bool MoveNext();

        Task<bool> MoveNextAsync();

        Task<bool> MoveNextAsync(CancellationToken cancellationToken);

        IDataReader ReadData();

        bool NextResult();

        Task<bool> NextResultAsync(CancellationToken cancellationToken = default);

        IReadOnlyList<IAdoDbParameter> GetOutputParameters();

        Task DisposeAsync();
    }
}
